<template>
<div>
<el-input-number v-model="value" v-bind="elProps" @change="change" />
</div>
</template>

<script setup>
import { ref,watch } from 'vue' 
const props = defineProps({
    elProps:Object,
    modelValue:[Number,String],
})
const value = ref(1)
watch(()=>props.modelValue,(newval)=>{
value.value = newval
})
value.value = props.modelValue
const emit = defineEmits(['update:modelValue'])
const change = ()=>{
    emit('update:modelValue',value.value)
}
</script>

<style lang='scss' scoped>

</style>